home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Contrib / STk-wtour / lessons / scale2.stk < prev    next >
Encoding:
Text File  |  1995-12-12  |  424 b   |  15 lines

  1. ;; A scale widget with options
  2.  
  3. (define (display-value n)
  4.   (format #t "Flow 1 = ~A\n" n))
  5.  
  6. (scale '.s1 :label "Flow 1" :from -1000 :to 1000 :orient "horizontal" 
  7.             :command display-value)
  8. (pack .s1)
  9.  
  10. ;; We could avoid the display-value definition by doing
  11. (scale '.s2 :label "Flow 2" :from -1000 :to 1000 :orient "horizontal" 
  12.             :command (lambda (n) 
  13.                (format #t "Flow 2 = ~A\n" n)))
  14. (pack .s2)
  15.